package edu.bit.water.service;

import java.sql.SQLSyntaxErrorException;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.BadSqlGrammarException;
import org.springframework.stereotype.Service;

import edu.bit.water.dao.LabelEvaCtestSumAssociationDao;
import edu.bit.water.dao.MetaEvaCtestSumAssociationDao;
import edu.bit.water.entity.LabelEvaCtestSum;
import edu.bit.water.entity.MetaEvaCtestSum;

@Service
public class LabelEvaCtestSumAssociationService {

	@Autowired
	private LabelEvaCtestSumAssociationDao labelEvaCtestSumAssociationDao;
	
	/**
	 * 
	 * @param metaEvaCtestSum 元数据水平衡评估实体类
	 * @return 成功返回1，失败返回0
	 * @throws BadSqlGrammarException
	 */
	public int insertLabelEvaCtestSumAssociation(MetaEvaCtestSum metaEvaCtestSum) throws BadSqlGrammarException{
		int n = labelEvaCtestSumAssociationDao.insertLabelEvaCtestSumAssociation(metaEvaCtestSum);
		return n;
	}
	public int updateLabelEvaCtestSumAssociation(MetaEvaCtestSum metaEvaCtestSum) throws BadSqlGrammarException{
		int n = labelEvaCtestSumAssociationDao.updateLabelEvaCtestSumAssociation(metaEvaCtestSum);
		return n;
	}
	
	/**
	 * 
	 * @param metaEvaCtestSum 元数据水平衡评估实体类
	 * @return 成功返回1，失败返回0
	 */
	public int deleteLabelEvaCtestSumAssociation(MetaEvaCtestSum metaEvaCtestSum) {
		int n = labelEvaCtestSumAssociationDao.deleteLabelEvaCtestSumAssociation(metaEvaCtestSum);
		return n;
	}
}
